<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="UnReplyQuery.aspx.vb" Inherits="WebForm_Mail_Reply" %>
<%@ Register src="Component/AssetDetail.ascx" tagname="AssetDetail" tagprefix="uc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:ObjectDataSource ID="dbAssetDef" runat="server" 
                SelectMethod="GetAssetType" TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" 
                        PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dbUnReply" runat="server" 
                SelectMethod="GetUnReplyData" TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlAssetDef" Name="def_id" 
                        PropertyName="SelectedValue" Type="String"  ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:ControlParameter ControlID="txtOwner" Name="Owner" PropertyName="Text" 
                        Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:ControlParameter ControlID="txtasset_serialNo" Name="asset_serialNo" 
                        PropertyName="Text" Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:ControlParameter ControlID="txtDept" Name="Dept" PropertyName="Text" 
                        Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:ControlParameter ControlID="ddlHouseID" Name="HouseID" 
                        PropertyName="SelectedValue" Type="String" ConvertEmptyStringToNull ="false" DefaultValue =""/>
                    <asp:ControlParameter ControlID="txtReturnDeadLin1" Name="ReturnDeadLine1" 
                        PropertyName="Text" Type="DateTime" />
                    <asp:ControlParameter ControlID="txtReturnDeadLin2" Name="ReturnDeadLine2" 
                        PropertyName="Text" Type="DateTime" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                    <asp:ControlParameter ControlID="ddlSendMail" Name="SendType"   ConvertEmptyStringToNull ="false" DefaultValue =""
                        PropertyName="SelectedValue" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dsSendMail" runat="server" DeleteMethod="DeleteSendMail"
                SelectMethod="GetSendMail" TypeName="AssetManage.BBL.MailBBL">
                <SelectParameters>
                    <asp:Parameter ConvertEmptyStringToNull="False" Name="ScheduleType" DefaultValue=""  Type="String" />
                    <asp:Parameter ConvertEmptyStringToNull="False" Name="AssetType" Type="String" />
                    <asp:Parameter ConvertEmptyStringToNull="False" Name="DeptNo" Type="String" DefaultValue="" />
                   
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
                <DeleteParameters>
                    <asp:Parameter Name="SerNo" Type="Int32" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </DeleteParameters>
            </asp:ObjectDataSource>
            <table>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                    <td>
                       
                                    <uc1:AssetDetail ID="AssetDetail1" runat="server" />
                                    <br />
                                    <table border="1">
                                        <tr>
                                            <td align="right" style="width: 111px">
                                               <asp:Label ID="lblAssetDef" runat="server" meta:resourcekey="lblAssetDef"></asp:Label>
                                            </td>
                                            <td style="width: 182px">
                                                <asp:DropDownList ID="ddlAssetDef" runat="server" DataSourceID="dbAssetDef" 
                                                    DataTextField="name" DataValueField="id" Width="120px">
                                                </asp:DropDownList>
                                            </td>
                                            <td align="right" style="width: 144px">
                                               <asp:Label ID="lblAssetowner" runat="server" meta:resourcekey="lblAssetowner"></asp:Label>
                                            </td>
                                            <td style="width: 204px">
                                                <asp:TextBox ID="txtOwner" runat="server" Width="80px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right" style="width: 111px">
                                               <asp:Label ID="lblAsset_SerialNo" runat="server" meta:resourcekey="lblAsset_SerialNo"></asp:Label>
                                            </td>
                                            <td style="width: 182px">
                                                <asp:TextBox ID="txtasset_serialNo" runat="server" Width="80px"></asp:TextBox>
                                            </td>
                                            <td align="right" style="width: 144px">
                                               <asp:Label ID="lblDept" runat="server" meta:resourcekey="lblDept"></asp:Label>
                                            </td>
                                            <td style="width: 204px">
                                                <asp:TextBox ID="txtDept" runat="server" Width="80px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td align="right" style="width: 111px">
                                               <asp:Label ID="lblHouseID" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                                            </td>
                                            <td style="width: 182px">
                                                <asp:DropDownList ID="ddlHouseID" runat="server" Width="120px">
                                                    <asp:ListItem meta:resourcekey="HouseID1"></asp:ListItem>
                                                    <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                                    <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                           <td align="right" >
                                                  <asp:Label ID="lblReturnDeadLine" runat="server" meta:resourcekey="lblReturnDeadLine"></asp:Label>
                                            </td>
                                            <td >
                                                <asp:TextBox ID="txtReturnDeadLin1" runat="server" Width="80px"></asp:TextBox>
                                                 <ajaxToolkit:CalendarExtender ID="txtReturnDeadLin1e_CalendarExtender" runat="server"
                                                            Format="yyyy/MM/dd" TargetControlID="txtReturnDeadLin1">
                                                        </ajaxToolkit:CalendarExtender>
                                                ~
                                                <asp:TextBox 
                                                    ID="txtReturnDeadLin2" runat="server" Width="80px"></asp:TextBox></td>
                                                     <ajaxToolkit:CalendarExtender ID="txtReturnDeadLin2_CalendarExtender" runat="server"
                                                            Format="yyyy/MM/dd" TargetControlID="txtReturnDeadLin2">
                                                        </ajaxToolkit:CalendarExtender>
                                                   
                                        </tr>
                                          <tr>
                                              <td align="right" style="width: 111px">
                                                  <asp:Label ID="lblExportKind" runat="server" meta:resourcekey="lblExportKind"></asp:Label>
                                              </td>
                                              <td style="width: 182px">
                                                  <asp:DropDownList ID="ddlExportKind" runat="server">
                                                  <asp:ListItem Value ="1" >Excel</asp:ListItem>
                                                  <asp:ListItem Value ="2" >CALC</asp:ListItem>
                                                  
                                                  </asp:DropDownList>
                                              
                                                 </td>
                                              <td align="right">
                                                  <asp:Label ID="lblSendMail" runat="server" meta:resourcekey="lblSendType"></asp:Label>
                                              </td>
                                              <td>
                                                  <asp:DropDownList ID="ddlSendMail" runat="server" DataSourceID="dsSendMail" 
                                                      DataTextField="MailSubject" DataValueField="SerNo">
                                                  </asp:DropDownList>
                                              </td>
                                        </tr>
                                          <tr>
                                            <td colspan="4" align ="center" >
                                             <asp:LinkButton ID="btnQuery" runat="server" meta:resourcekey="btnQuery"></asp:LinkButton>
                                                &nbsp;&nbsp;&nbsp; &nbsp;
                                                <asp:LinkButton ID="btnPrint" runat="server" meta:resourcekey="btnPrint"></asp:LinkButton>
                                            </td>
                                            </tr>
                                        <tr>
                                            <td colspan="4">
                                                <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False"
                                                    Width="900px" AllowHoverSelect="False" AllowPaging="True" AutoGenerateColumns="False"
                                                    ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True" SkinID="pager" 
                                                    TotalRowCount="0" DataSourceID="dbUnReply" Visible="False" >
                                                    <EmptyDataTemplate>
                                                        <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                                                    </EmptyDataTemplate>
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="btnDetail" runat="server" onclick="btnDetail_Click" meta:resourcekey="btnDetail"  CommandArgument='<%# Bind("asset_serialNo") %>'></asp:LinkButton>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField  meta:resourcekey="colAssetDef"  DataField ="DefName"/>
                                                        <asp:BoundField meta:resourcekey="colAsset_SerialNo" DataField ="asset_serialNO"/>
                                                        <asp:BoundField meta:resourcekey="colAssetowner" DataField ="asset_owner"/>
                                                         <asp:BoundField meta:resourcekey="colAssetowner" DataField ="OwnerName"/>
                                                        
                                                        <asp:BoundField meta:resourcekey="colUser1" DataField ="User1"/>
                                                        <asp:BoundField meta:resourcekey="colStatus" DataField ="asset_status"/>
                                                        <asp:BoundField meta:resourcekey="colComputerName" DataField ="ComputerName"/>
                                                        <asp:BoundField HeaderText="Class" DataField ="Class"/>
                                                        <asp:BoundField  meta:resourcekey="colLoacation" DataField ="UsingType" />  
                                                                                                             
                                                         <asp:BoundField meta:resourcekey="colReturnDeadLine" DataField ="ReturnDeadLine"  DataFormatString ="{0:yyyy/MM/dd}" />  
                                                        
                                                    </Columns>
                                                </TServerControl:TGridView>
                                            </td>
                                        </tr>
                                    </table>
                                
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
